<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: Interval Heap manipulation module</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__gdsl__interval__heap.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Interval Heap manipulation module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct heap *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL interval heap type.  <a href="#ga5e1a5587bdc007c4fbc5f70637456241"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69">gdsl_interval_heap_alloc</a> (const char *NAME, <a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a> ALLOC_F, <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a> FREE_F, <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a> COMP_F)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new interval heap.  <a href="#gad82810541aa6da1501620005170f8f69"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#gae5d0d0082d3fac1ec99785463ef8f28b">gdsl_interval_heap_free</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy an interval heap.  <a href="#gae5d0d0082d3fac1ec99785463ef8f28b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga7dae75a663cfeabc66f2ee9b00578ace">gdsl_interval_heap_flush</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush an interval heap.  <a href="#ga7dae75a663cfeabc66f2ee9b00578ace"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga52947a2da42093fc2311c8fb3ca491dd">gdsl_interval_heap_get_name</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of an interval heap.  <a href="#ga52947a2da42093fc2311c8fb3ca491dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga1c7c88a01669c07f64e3294f949c0a43">gdsl_interval_heap_get_size</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of a interval heap.  <a href="#ga1c7c88a01669c07f64e3294f949c0a43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga21ee892d8003ff50222d0707c4281549">gdsl_interval_heap_set_max_size</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the maximum size of the interval heap.  <a href="#ga21ee892d8003ff50222d0707c4281549"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga6e329a666da3a0b458268ada095c18fa">gdsl_interval_heap_is_empty</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if an interval heap is empty.  <a href="#ga6e329a666da3a0b458268ada095c18fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga2075f45fca01382a89dbbf277f41388f">gdsl_interval_heap_set_name</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, const char *NEW_NAME)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the name of an interval heap.  <a href="#ga2075f45fca01382a89dbbf277f41388f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83">gdsl_interval_heap_insert</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, void *VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an element into an interval heap (PUSH).  <a href="#ga97ca3f86ba3907eed4db346e2f873f83"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga1b5f2e5102825964d3543cae3d48eb0b">gdsl_interval_heap_remove_max</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the maximum element from an interval heap (POP).  <a href="#ga1b5f2e5102825964d3543cae3d48eb0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#gab4e35b67b85609f6b0cc8f0521a8cacd">gdsl_interval_heap_remove_min</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the minimum element from an interval heap (POP).  <a href="#gab4e35b67b85609f6b0cc8f0521a8cacd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga3576776093ad517de6d71f21b1567ede">gdsl_interval_heap_get_min</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the minimum element.  <a href="#ga3576776093ad517de6d71f21b1567ede"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga59ad41d4a5b072814068bf4edac5a108">gdsl_interval_heap_get_max</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum element.  <a href="#ga59ad41d4a5b072814068bf4edac5a108"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga55de933db44333826b51cb88f7d8de32">gdsl_interval_heap_delete_min</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the minimum element from an interval heap.  <a href="#ga55de933db44333826b51cb88f7d8de32"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga1953acd55f7763e63dd6b8fb36a85393">gdsl_interval_heap_delete_max</a> (<a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the maximum element from an interval heap.  <a href="#ga1953acd55f7763e63dd6b8fb36a85393"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga2d74bb427724ab6b25d4e1b392ba9d51">gdsl_interval_heap_map_forward</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, <a class="el" href="group__gdsl__types.html#ga2500bfaaec5df890e72b43f448f13ee8">gdsl_map_func_t</a> MAP_F, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a interval heap.  <a href="#ga2d74bb427724ab6b25d4e1b392ba9d51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#gac016064438876b2150380ccd5c9257e3">gdsl_interval_heap_write</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write all the elements of an interval heap to a file.  <a href="#gac016064438876b2150380ccd5c9257e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga80c44688b420e85e49e156ef95d1d14b">gdsl_interval_heap_write_xml</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of an interval heap to a file into XML.  <a href="#ga80c44688b420e85e49e156ef95d1d14b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__interval__heap.html#ga3593968cc68acd5074281889395b11e0">gdsl_interval_heap_dump</a> (const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump the internal structure of an interval heap to a file.  <a href="#ga3593968cc68acd5074281889395b11e0"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga5e1a5587bdc007c4fbc5f70637456241"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_t" ref="ga5e1a5587bdc007c4fbc5f70637456241" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct heap* <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL interval heap type. </p>
<p>This type is voluntary opaque. Variables of this kind couldn't be directly used, but by the functions of this module. </p>

<p>Definition at line <a class="el" href="gdsl__interval__heap_8h_source.html#l00053">53</a> of file <a class="el" href="gdsl__interval__heap_8h_source.html">gdsl_interval_heap.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gad82810541aa6da1501620005170f8f69"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_alloc" ref="gad82810541aa6da1501620005170f8f69" args="(const char *NAME, gdsl_alloc_func_t ALLOC_F, gdsl_free_func_t FREE_F, gdsl_compare_func_t COMP_F)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> <a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69">gdsl_interval_heap_alloc</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NAME</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a>&#160;</td>
          <td class="paramname"><em>ALLOC_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a>&#160;</td>
          <td class="paramname"><em>FREE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a>&#160;</td>
          <td class="paramname"><em>COMP_F</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new interval heap. </p>
<p>Allocate a new interval heap data structure which name is set to a copy of NAME. The function pointers ALLOC_F, FREE_F and COMP_F could be used to respectively, alloc, free and compares elements in the interval heap. These pointers could be set to NULL to use the default ones:</p>
<ul>
<li>the default ALLOC_F simply returns its argument</li>
<li>the default FREE_F does nothing</li>
<li>the default COMP_F always returns 0</li>
</ul>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">NAME</td><td>The name of the new interval heap to create </td></tr>
    <tr><td class="paramname">ALLOC_F</td><td>Function to alloc element when inserting it in the interval heap </td></tr>
    <tr><td class="paramname">FREE_F</td><td>Function to free element when removing it from the interval heap </td></tr>
    <tr><td class="paramname">COMP_F</td><td>Function to compare elements into the interval heap </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated interval heap in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gae5d0d0082d3fac1ec99785463ef8f28b" title="Destroy an interval heap.">gdsl_interval_heap_free()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga7dae75a663cfeabc66f2ee9b00578ace" title="Flush an interval heap.">gdsl_interval_heap_flush()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gae5d0d0082d3fac1ec99785463ef8f28b"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_free" ref="gae5d0d0082d3fac1ec99785463ef8f28b" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#gae5d0d0082d3fac1ec99785463ef8f28b">gdsl_interval_heap_free</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy an interval heap. </p>
<p>Deallocate all the elements of the interval heap H by calling H's FREE_F function passed to <a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a>. The name of H is deallocated and H is deallocated itself too.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to destroy </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga7dae75a663cfeabc66f2ee9b00578ace" title="Flush an interval heap.">gdsl_interval_heap_flush()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga7dae75a663cfeabc66f2ee9b00578ace"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_flush" ref="ga7dae75a663cfeabc66f2ee9b00578ace" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#ga7dae75a663cfeabc66f2ee9b00578ace">gdsl_interval_heap_flush</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flush an interval heap. </p>
<p>Deallocate all the elements of the interval heap H by calling H's FREE_F function passed to <a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a>. H is not deallocated itself and H's name is not modified.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The heap to flush </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#gae5d0d0082d3fac1ec99785463ef8f28b" title="Destroy an interval heap.">gdsl_interval_heap_free()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga52947a2da42093fc2311c8fb3ca491dd"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_get_name" ref="ga52947a2da42093fc2311c8fb3ca491dd" args="(const gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__gdsl__interval__heap.html#ga52947a2da42093fc2311c8fb3ca491dd">gdsl_interval_heap_get_name</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the name of an interval heap. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>The returned string MUST NOT be freed. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to get the name from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the interval heap H. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga2075f45fca01382a89dbbf277f41388f" title="Set the name of an interval heap.">gdsl_interval_heap_set_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga1c7c88a01669c07f64e3294f949c0a43"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_get_size" ref="ga1c7c88a01669c07f64e3294f949c0a43" args="(const gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__interval__heap.html#ga1c7c88a01669c07f64e3294f949c0a43">gdsl_interval_heap_get_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the size of a interval heap. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to get the size from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of H (noted |H|). </dd></dl>

</div>
</div>
<a class="anchor" id="ga21ee892d8003ff50222d0707c4281549"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_set_max_size" ref="ga21ee892d8003ff50222d0707c4281549" args="(const gdsl_interval_heap_t H, ulong size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#ga21ee892d8003ff50222d0707c4281549">gdsl_interval_heap_set_max_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the maximum size of the interval heap. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to get the size from </td></tr>
    <tr><td class="paramname">size</td><td>The new maximum size </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of H (noted |H|). </dd></dl>

</div>
</div>
<a class="anchor" id="ga6e329a666da3a0b458268ada095c18fa"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_is_empty" ref="ga6e329a666da3a0b458268ada095c18fa" args="(const gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a> <a class="el" href="group__gdsl__interval__heap.html#ga6e329a666da3a0b458268ada095c18fa">gdsl_interval_heap_is_empty</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if an interval heap is empty. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the interval heap H is empty. </dd>
<dd>
FALSE if the interval heap H is not empty. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2075f45fca01382a89dbbf277f41388f"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_set_name" ref="ga2075f45fca01382a89dbbf277f41388f" args="(gdsl_interval_heap_t H, const char *NEW_NAME)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga2075f45fca01382a89dbbf277f41388f">gdsl_interval_heap_set_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NEW_NAME</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the name of an interval heap. </p>
<p>Change the previous name of the interval heap H to a copy of NEW_NAME.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to change the name </td></tr>
    <tr><td class="paramname">NEW_NAME</td><td>The new name of H </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified interval heap in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga52947a2da42093fc2311c8fb3ca491dd" title="Get the name of an interval heap.">gdsl_interval_heap_get_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga97ca3f86ba3907eed4db346e2f873f83"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_insert" ref="ga97ca3f86ba3907eed4db346e2f873f83" args="(gdsl_interval_heap_t H, void *VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83">gdsl_interval_heap_insert</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert an element into an interval heap (PUSH). </p>
<p>Allocate a new element E by calling H's ALLOC_F function on VALUE. The element E is then inserted into H at the good position to ensure H is always an interval heap.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( log ( |H| ) ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to modify </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value used to make the new element to insert into H </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the inserted element E in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a> </dd>
<dd>
gdsl_interval_heap_remove() </dd>
<dd>
gdsl_interval_heap_delete() </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga1c7c88a01669c07f64e3294f949c0a43" title="Get the size of a interval heap.">gdsl_interval_heap_get_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga1b5f2e5102825964d3543cae3d48eb0b"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_remove_max" ref="ga1b5f2e5102825964d3543cae3d48eb0b" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga1b5f2e5102825964d3543cae3d48eb0b">gdsl_interval_heap_remove_max</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove the maximum element from an interval heap (POP). </p>
<p>Remove the maximum element from the interval heap H. The element is removed from H and is also returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( log ( |H| ) ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the removed top element. </dd>
<dd>
NULL if the interval heap is empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83" title="Insert an element into an interval heap (PUSH).">gdsl_interval_heap_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga1953acd55f7763e63dd6b8fb36a85393" title="Delete the maximum element from an interval heap.">gdsl_interval_heap_delete_max()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab4e35b67b85609f6b0cc8f0521a8cacd"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_remove_min" ref="gab4e35b67b85609f6b0cc8f0521a8cacd" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#gab4e35b67b85609f6b0cc8f0521a8cacd">gdsl_interval_heap_remove_min</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove the minimum element from an interval heap (POP). </p>
<p>Remove the minimum element from the interval heap H. The element is removed from H and is also returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( log ( |H| ) ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the removed top element. </dd>
<dd>
NULL if the interval heap is empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83" title="Insert an element into an interval heap (PUSH).">gdsl_interval_heap_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga1953acd55f7763e63dd6b8fb36a85393" title="Delete the maximum element from an interval heap.">gdsl_interval_heap_delete_max()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga3576776093ad517de6d71f21b1567ede"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_get_min" ref="ga3576776093ad517de6d71f21b1567ede" args="(const gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga3576776093ad517de6d71f21b1567ede">gdsl_interval_heap_get_min</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the minimum element. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to get the size from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The smallest element in H </dd></dl>

</div>
</div>
<a class="anchor" id="ga59ad41d4a5b072814068bf4edac5a108"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_get_max" ref="ga59ad41d4a5b072814068bf4edac5a108" args="(const gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga59ad41d4a5b072814068bf4edac5a108">gdsl_interval_heap_get_max</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the maximum element. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to get the size from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The largest element in H </dd></dl>

</div>
</div>
<a class="anchor" id="ga55de933db44333826b51cb88f7d8de32"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_delete_min" ref="ga55de933db44333826b51cb88f7d8de32" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga55de933db44333826b51cb88f7d8de32">gdsl_interval_heap_delete_min</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete the minimum element from an interval heap. </p>
<p>Remove the minimum element from the interval heap H. The element is removed from H and is also deallocated using H's FREE_F function passed to <a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a>, then H is returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( log ( |H| ) ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified interval heap after removal of top element. </dd>
<dd>
NULL if interval heap is empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83" title="Insert an element into an interval heap (PUSH).">gdsl_interval_heap_insert()</a> </dd>
<dd>
gdsl_interval_heap_remove_top() </dd></dl>

</div>
</div>
<a class="anchor" id="ga1953acd55f7763e63dd6b8fb36a85393"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_delete_max" ref="ga1953acd55f7763e63dd6b8fb36a85393" args="(gdsl_interval_heap_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga1953acd55f7763e63dd6b8fb36a85393">gdsl_interval_heap_delete_max</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete the maximum element from an interval heap. </p>
<p>Remove the maximum element from the interval heap H. The element is removed from H and is also deallocated using H's FREE_F function passed to <a class="el" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc()</a>, then H is returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( log ( |H| ) ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified interval heap after removal of top element. </dd>
<dd>
NULL if interval heap is empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83" title="Insert an element into an interval heap (PUSH).">gdsl_interval_heap_insert()</a> </dd>
<dd>
gdsl_interval_heap_remove_top() </dd></dl>

</div>
</div>
<a class="anchor" id="ga2d74bb427724ab6b25d4e1b392ba9d51"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_map_forward" ref="ga2d74bb427724ab6b25d4e1b392ba9d51" args="(const gdsl_interval_heap_t H, gdsl_map_func_t MAP_F, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__interval__heap.html#ga2d74bb427724ab6b25d4e1b392ba9d51">gdsl_interval_heap_map_forward</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga2500bfaaec5df890e72b43f448f13ee8">gdsl_map_func_t</a>&#160;</td>
          <td class="paramname"><em>MAP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a interval heap. </p>
<p>Parse all elements of the interval heap H. The MAP_F function is called on each H's element with USER_DATA argument. If MAP_F returns GDSL_MAP_STOP then gdsl_interval_heap_map() stops and returns its last examinated element.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t &amp; MAP_F != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to map </td></tr>
    <tr><td class="paramname">MAP_F</td><td>The map function. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to MAP_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first element for which MAP_F returns GDSL_MAP_STOP. </dd>
<dd>
NULL when the parsing is done. </dd></dl>

</div>
</div>
<a class="anchor" id="gac016064438876b2150380ccd5c9257e3"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_write" ref="gac016064438876b2150380ccd5c9257e3" args="(const gdsl_interval_heap_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#gac016064438876b2150380ccd5c9257e3">gdsl_interval_heap_write</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write all the elements of an interval heap to a file. </p>
<p>Write the elements of the interval heap H to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t &amp; OUTPUT_FILE != NULL &amp; WRITE_F != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#ga80c44688b420e85e49e156ef95d1d14b" title="Write the content of an interval heap to a file into XML.">gdsl_interval_heap_write_xml()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga3593968cc68acd5074281889395b11e0" title="Dump the internal structure of an interval heap to a file.">gdsl_interval_heap_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga80c44688b420e85e49e156ef95d1d14b"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_write_xml" ref="ga80c44688b420e85e49e156ef95d1d14b" args="(const gdsl_interval_heap_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#ga80c44688b420e85e49e156ef95d1d14b">gdsl_interval_heap_write_xml</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of an interval heap to a file into XML. </p>
<p>Write the elements of the interval heap H to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F to write H's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gac016064438876b2150380ccd5c9257e3" title="Write all the elements of an interval heap to a file.">gdsl_interval_heap_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga3593968cc68acd5074281889395b11e0" title="Dump the internal structure of an interval heap to a file.">gdsl_interval_heap_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga3593968cc68acd5074281889395b11e0"></a><!-- doxytag: member="gdsl_interval_heap.h::gdsl_interval_heap_dump" ref="ga3593968cc68acd5074281889395b11e0" args="(const gdsl_interval_heap_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__interval__heap.html#ga3593968cc68acd5074281889395b11e0">gdsl_interval_heap_dump</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">gdsl_interval_heap_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump the internal structure of an interval heap to a file. </p>
<p>Dump the structure of the interval heap H to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F to write H's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_interval_heap_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The interval heap to write </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__interval__heap.html#gac016064438876b2150380ccd5c9257e3" title="Write all the elements of an interval heap to a file.">gdsl_interval_heap_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__interval__heap.html#ga80c44688b420e85e49e156ef95d1d14b" title="Write the content of an interval heap to a file into XML.">gdsl_interval_heap_write_xml()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
